/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.close.flow.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.close.common.constant.enums.ParkCloseSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.SysDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 物流单
 *
 * @author pig
 * @date 2023-11-01 10:07:39
 */
@Data
@TableName(value = "closed_bill", excludeProperty = "tenantId")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "物流单")
public class ClosedBillEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="ID")
    private Long id;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;

	/**
	 * 运单号
	 */
	@Schema(description="运单号")
	private String billNo;

	/**
	* 是否空车
	*/
    @Schema(description="是否空车")
    private String emptyCarFlag;

	/**
	* 车牌号
	*/
    @Schema(description="车牌号")
    private String licencePlateNumber;

	/**
	* 进出类型
	*/
    @Schema(description="进出类型")
    private Integer accessType;

	/**
	* 接收人
	*/
    @Schema(description="接收人")
    private String acceptPersonName;

	/**
	* 接收人手机号
	*/
    @Schema(description="接收人手机号")
    private String acceptPersonPhone;

	/**
	* 危险品类型
	*/
    @Schema(description="危险品类型")
    private Integer hazardType;

	/**
	* 计划入园时间
	*/
    @Schema(description="计划入园时间")
    private Date planEnterTime;

	/**
	* 计划出园时间
	*/
    @Schema(description="计划出园时间")
    private Date planLeaveTime;

	/**
	* 驾驶员
	*/
    @Schema(description="驾驶员")
    private String driverName;

	/**
	* 驾驶员手机号
	*/
    @Schema(description="驾驶员手机号")
    private String driverPhone;

	/**
	* 驾驶员身份证
	*/
    @Schema(description="驾驶员身份证")
    private String driverIdNum;

	/**
	* 押运员
	*/
    @Schema(description="押运员")
    private String supercargoName;

	/**
	* 押运员手机号
	*/
    @Schema(description="押运员手机号")
    private String supercargoPhone;

	/**
	* 押运员身份证
	*/
    @Schema(description="押运员身份证")
    private String supercargoIdNum;

	/**
	* 状态
	*/
    @Schema(description="状态")
    private Integer status;

	/**
	* 备注
	*/
    @Schema(description="备注")
    private String remarks;

	public String getEmptyCarFlagStr() {
		return DictResolver.getItemLabelByValue(SysDictEnum.yes_no_type, this.getEmptyCarFlag());
	}

	public String getStatusStr() {
		return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_flow_bill_status, this.getStatus());
	}

}
